<template>
    <div class="box">
        <h1>Item组件</h1>
        <h2>{{ msg }}</h2>
        <h2>原价：{{ money }}</h2>
        <h2>补贴价：{{money - $store.state.money}}</h2>
    </div>
    
</template>

<script>
export default {
    name:'Item',
    data(){
        return{
            money:399
        }
    },
    computed:{
        msg(){
            return this.$store.state.message
        }
    }
}
</script>

<style>
    .box{
        width: 200px;
        height: 200px;
        background-color: aquamarine;
        float: left;
        margin-left: 30px;
    }
</style>